package com.kethink;

/**
 * @Description create by xuxiaojun
 * date: 2018/12/26
 * Time: 10:42
 */
public class LeeCode_961 {



    public static int repeatedNTimes(int[] A) {
        for(int i = 0 ; i < A.length ; i++){
            for( int j = 0; j < A.length;j++ ){
                if(j == i){
                    continue;
                }
                if((A[i] ^ A[j])==0){
                    return A[i];
                }
            }
        }
        return -1;
    }

    public static void main(String[] args){
        int[] A = new int[]{1,2,3,3};
        System.out.println(repeatedNTimes(A));
    }
}
